<?php
define('MVMMALL_SCR','rss');
require_once './include/common.inc.php';
header("Content-type: application/xml");
$fidarray = array('1','6');
echo 	"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n".
	"<rss version=\"2.0\">\n".
	"  <channel>\n".
	(count($fidarray) > 1 ?
		"    <title>$mm_mall_name</title>\n".
		"    <link>".MVMMALL_DIR."</link>\n".
		"    <description>$mm_description</description>\n"
		:
		"    <title>$mm_mall_name</title>\n".
		"    <link>{$boardurl}forumdisplay.php?fid=$rssfid</link>\n".
		"    <description>$mm_description</description>\n"
	).
	"    <copyright>Copyright(C) $mm_mall_name </copyright>\n".
	"    <generator>Powered by MvMmall.</generator>\n".
	"    <lastBuildDate>".gmdate('r', $m_now_time)."</lastBuildDate>\n".
	"    <ttl>$ttl</ttl>\n".
	"    <image>\n".
	"      <url>".MVMMALL_DIR."/images/logo.gif</url>\n".
	"      <title>$mm_mall_name</title>\n".
	"      <link>".MVMMALL_DIR."</link>\n".
	"    </image>\n";

if($fidarray) {
	$query = $db->query("SELECT * FROM {$tablepre}goods_table");
		while($rt = $db->fetch_array($query)) {
			
				echo 	"  <item>\n".
					"      <title>".dhtmlchars($rt['goods_name'])."</title>\n".
					"      <link>".MVMMALL_DIR."/product.php?action=$rt[uid]</link>\n".
					"      <description>$rt[goods_advance]</description>\n".
					"      <category>".dhtmlchars($rt['goods_category'])."</category>\n".
					"      <author>".dhtmlchars($rt['author'])."</author>\n".
					"      <pubDate>".gmdate('r', $rt['register_date'])."</pubDate>\n".
					"    </item>\n";
			}
			
			
}
	

echo "  </channel>\n".
	"</rss>";